 {%extends 'df_user/base.html'%}





{%block right_content %}
<div class="right_content clearfix">
    <h3 class="common_title2">收货地址</h3>
    <div class="site_con">
        <dl>
            <dt>当前地址：</dt> {% if user.uaddress != '' %}
            <dd>{{user.uaddress}} ({{user.ushou}} 收) 电话：{{user.uphone}} 邮编：{{user.uyoubian}} <a href="javascript:;" id="del_address">删除</a></dd>
            {% else %}
            <dd>无</dd>
            {% endif %}
        </dl>
    </div>
    <h3 class="common_title2">编辑地址</h3>
    <div class="site_con">
        <form action="/user/site/" method="post">
            {%csrf_token%}
            <div class="form_group">
                <label>收件人：</label>
                <input type="text" name="ushou" value="{{user.ushou}}">
            </div>
            <div class="form_group form_group2">
                <label>详细地址：</label>
                <textarea class="site_area" name="uaddress">{{user.uaddress}}</textarea>
            </div>
            <div class="form_group">
                <label>邮编：</label>
                <input type="text" name="uyoubian" value="{{user.uyoubian}}">
            </div>
            <div class="form_group">
                <label>手机：</label>
                <input type="text" name="uphone" value="{{user.uphone}}">
            </div>

            <input type="submit" name="" value="提交" class="info_submit">
			
        </form>
    </div>
</div>
</div>

<script>



    $(function(){
		var $btn = $("#del_address");
		$btn.click(function(){
			if(confirm('确实要删除该地址吗?'))
			location='/user/delete'
			
		});

	});
</script>

{%endblock right_content %}